#ifndef FORM_LOGIN_H
#define FORM_LOGIN_H

#include <QWidget>
#include <QTcpSocket>
#include <QStringList>
#include <QMessageBox>

#include "form_delivery.h"


namespace Ui {
class Form_login;
}

class Form_login : public QWidget
{
    Q_OBJECT

public:
    explicit Form_login(QWidget *parent = 0);
    ~Form_login();

    void clear_all();

    void send_login_request();

    void read_login_request();

    int get_info(QString recv);

private slots:
    void on_btn_0_clicked();

    void on_btn_2_clicked();

    void on_btn_3_clicked();

    void on_btn_4_clicked();

    void on_btn_5_clicked();

    void on_btn_6_clicked();

    void on_btn_7_clicked();

    void on_btn_8_clicked();

    void on_btn_9_clicked();

    void on_btn_1_clicked();

    void on_btn_del_clicked();

    void on_btn_sure_clicked();

    void on_btn_rewrite_clicked();

    void on_btn_ret_clicked();

    void on_btn_quit_clicked();

    void exchangeLoginSlot();

    void on_checkBox_clicked(bool checked);

    void connectedSlot();

    void readSlot();

signals:
    void return_welcome();

private:
    Ui::Form_login *ui;

    Form_delivery fdlv;

    int num_or_pwd;

    QTcpSocket *socket;

    QString last;
};

#endif // FORM_LOGIN_H
